<template>
  <div class="page-container data-lake">
    <div class="f-r a-c j-b">
      <div class="box-title">数据汇聚</div>
      <el-form inline>
        <el-form-item label="统计维度：">
          <el-radio-group v-model="searchParams.type">
            <el-radio :label="1" border>全市总览</el-radio>
            <el-radio :label="2" border>部门详情</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item>
          <el-select v-model="searchParams.dept" placeholder="选择部门">
            <el-option
              v-for="item in deptOptions"
              :key="item.id"
              :label="item.name"
              :value="item.id"
            />
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-button type="primary">确认</el-button>
        </el-form-item>
      </el-form>
    </div>
    <div class="banner f-r a-c j-c">
      今日接入数据：109万
    </div>
    <el-card shadow="none">
      <el-row :gutter="20">
        <el-col v-for="(item,index) in cardList1" :key="index" :span="6">
          <div class="section_6 f-c">
            <div class="box_5 f-r j-b">
              <img
                class="image_1"
                referrerpolicy="no-referrer"
                src="https://lanhu.oss-cn-beijing.aliyuncs.com/psa72b1z1x9a4pwf27n12a1osivdp47oh6fd42798-306b-42da-80a2-761e3ee57301"
              >
              <span class="text_19">{{ index + 1 }}.{{ item.name }}</span>
            </div>
            <div class="box_6 f-r j-b">
              <div v-for="(subitem,subIndex) in item.data" :key="subIndex" class="image-text_6 f-c j-b">
                <div class="text-wrapper_4 f-c">
                  <v-chart autoresize style="width: 100%;height: 100%" :option="subitem.value" />
                </div>
                <span class="text-group_6">{{ subitem.name }}</span>
              </div>
            </div>
          </div>
        </el-col>
      </el-row>
    </el-card>
    <div class="box-title" style="margin: 20px 0 10px 0">
      主题库资产总览
    </div>
    <el-card shadow="none">
      <el-row :gutter="40">
        <el-col :span="8">
          <div class="block_7 f-c">
            <div class="section_12 f-r">
              <img
                class="image_5"
                referrerpolicy="no-referrer"
                src="https://lanhu.oss-cn-beijing.aliyuncs.com/pstgxq9pyv5xqg0i8sh4hnxr2zrpve3o1p3c7d60dd3-b4f5-48d4-be1e-a14ada938066"
              >
              <div class="text-wrapper_16 f-c j-b">
                <span class="text_40">业务资产</span>
                <span class="text_41">业务对象</span>
              </div>
              <div class="text-wrapper_17">
                <span class="text_42">47</span>
                <span class="text_43">个</span>
              </div>
            </div>
            <div class="section_13 f-r j-b">
              <span class="text_44">逻辑实体</span>
              <div class="text-wrapper_18">
                <span class="text_45">65</span>
                <span class="text_46">个</span>
              </div>
            </div>
            <div class="section_14 f-r j-b">
              <span class="text_47">业务属性</span>
              <div class="text-wrapper_19">
                <span class="text_48">265</span>
                <span class="text_49">个</span>
              </div>
            </div>
          </div>
        </el-col>
        <el-col :span="8">
          <div class="block_7 f-c">
            <div class="section_12 f-r">
              <img
                class="image_5"
                referrerpolicy="no-referrer"
                src="https://lanhu.oss-cn-beijing.aliyuncs.com/pstgxq9pyv5xqg0i8sh4hnxr2zrpve3o1p3c7d60dd3-b4f5-48d4-be1e-a14ada938066"
              >
              <div class="text-wrapper_16 f-c j-b">
                <span class="text_40">技术资产</span>
                <span class="text_41">数据库</span>
              </div>
              <div class="text-wrapper_17">
                <span class="text_42">47</span>
                <span class="text_43">个</span>
              </div>
            </div>
            <div class="section_13 f-r j-b">
              <span class="text_44">数据表</span>
              <div class="text-wrapper_18">
                <span class="text_45">65</span>
                <span class="text_46">个</span>
              </div>
            </div>
            <div class="section_14 f-r j-b">
              <span class="text_47">数据量</span>
              <div class="text-wrapper_19">
                <span class="text_48">265</span>
                <span class="text_49">个</span>
              </div>
            </div>
          </div>
        </el-col>
      </el-row>
    </el-card>
    <div class="box-title" style="margin: 20px 0 10px 0">
      专题库资产总览
    </div>
    <el-card shadow="none">
      <el-row :gutter="40">
        <el-col :span="8">
          <div class="block_7 f-c">
            <div class="section_12 f-r">
              <img
                class="image_5"
                referrerpolicy="no-referrer"
                src="https://lanhu.oss-cn-beijing.aliyuncs.com/pstgxq9pyv5xqg0i8sh4hnxr2zrpve3o1p3c7d60dd3-b4f5-48d4-be1e-a14ada938066"
              >
              <div class="text-wrapper_16 f-c j-b">
                <span class="text_40">业务资产</span>
                <span class="text_41">业务对象</span>
              </div>
              <div class="text-wrapper_17">
                <span class="text_42">47</span>
                <span class="text_43">个</span>
              </div>
            </div>
            <div class="section_13 f-r j-b">
              <span class="text_44">逻辑实体</span>
              <div class="text-wrapper_18">
                <span class="text_45">65</span>
                <span class="text_46">个</span>
              </div>
            </div>
            <div class="section_14 f-r j-b">
              <span class="text_47">业务属性</span>
              <div class="text-wrapper_19">
                <span class="text_48">265</span>
                <span class="text_49">个</span>
              </div>
            </div>
          </div>
        </el-col>
        <el-col :span="8">
          <div class="block_7 f-c">
            <div class="section_12 f-r">
              <img
                class="image_5"
                referrerpolicy="no-referrer"
                src="https://lanhu.oss-cn-beijing.aliyuncs.com/pstgxq9pyv5xqg0i8sh4hnxr2zrpve3o1p3c7d60dd3-b4f5-48d4-be1e-a14ada938066"
              >
              <div class="text-wrapper_16 f-c j-b">
                <span class="text_40">技术资产</span>
                <span class="text_41">数据库</span>
              </div>
              <div class="text-wrapper_17">
                <span class="text_42">47</span>
                <span class="text_43">个</span>
              </div>
            </div>
            <div class="section_13 f-r j-b">
              <span class="text_44">数据表</span>
              <div class="text-wrapper_18">
                <span class="text_45">65</span>
                <span class="text_46">个</span>
              </div>
            </div>
            <div class="section_14 f-r j-b">
              <span class="text_47">数据量</span>
              <div class="text-wrapper_19">
                <span class="text_48">265</span>
                <span class="text_49">个</span>
              </div>
            </div>
          </div>
        </el-col>
      </el-row>
    </el-card>
  </div>

</template>

<script>
import * as echarts from 'echarts'

export default {
  name: 'Index',
  data() {
    return {
      searchParams: {
        type: 1,
        dept: '',
        time: ' '
      },
      deptOptions: [],
      cardList1: []
    }
  },
  created() {
    this.cardList1 = [
      { name: '归集库',
        data: [
          { name: '库表数', value: this.getOption1(987, '#29DCC9', '#45EFC8') },
          { name: '字段数', value: this.getOption1(987, '#FFAB2E', '#FFDB85') },
          { name: '数据量', value: this.getOption1(987, '#FF7474', '#FFC1BF') }
        ]
      },
      { name: '中心库',
        data: [
          { name: '库表数', value: this.getOption1(987, '#29DCC9', '#45EFC8') },
          { name: '字段数', value: this.getOption1(987, '#FFAB2E', '#FFDB85') },
          { name: '数据量', value: this.getOption1(987, '#FF7474', '#FFC1BF') }
        ]
      },
      { name: '主题库',
        data: [
          { name: '库表数', value: this.getOption1(987, '#29DCC9', '#45EFC8') },
          { name: '字段数', value: this.getOption1(987, '#FFAB2E', '#FFDB85') },
          { name: '数据量', value: this.getOption1(987, '#FF7474', '#FFC1BF') }
        ]
      },
      { name: '专题库',
        data: [
          { name: '库表数', value: this.getOption1(987, '#29DCC9', '#45EFC8') },
          { name: '字段数', value: this.getOption1(987, '#FFAB2E', '#FFDB85') },
          { name: '数据量', value: this.getOption1(987, '#FF7474', '#FFC1BF') }
        ]
      }
    ]
  },
  methods: {
    getOption1(value, color1, color2) {
      return {
        title: {
          text: value,
          left: 'center',
          top: 'center',
          textStyle: {
            color: '#fff'
          }
        },
        series: [
          {
            name: 'Access From',
            type: 'pie',
            radius: '90%',
            data: [
              { value, name: 'Search Engine' }
            ],
            label: { show: false },
            lineStyle: { show: false },
            itemStyle: {
              color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
                offset: 0,
                color: color1
              }, {
                offset: 1,
                color: color2
              }])
            }
          }
        ]
      }
    }
  }
}
</script>

<style lang="scss">
.data-lake {
  .el-radio {
    width: 220px;
    height: 40px;
    margin-right: 20px;
    background: #fff;
  }
  .banner {
    height: 121px;
    font-size: 30px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #FFFFFF;
    background-color: #0052D9;
  }

  .block_7 {
    background-color: rgba(255, 255, 255, 1);
    height: 250px;
    border: 1px solid rgba(236, 240, 248, 1);
    width: 491px;
    margin: 29px 0 0 39px;
  }

  .section_12 {
    width: 347px;
    height: 83px;
    margin: 38px 0 0 27px;
  }

  .image_5 {
    width: 79px;
    height: 71px;
    margin-top: 3px;
  }

  .text-wrapper_16 {
    width: 82px;
    height: 80px;
    margin-left: 49px;
  }

  .text_40 {
    width: 82px;
    height: 20px;
    overflow-wrap: break-word;
    color: rgba(26, 26, 26, 1);
    font-size: 20px;
    font-family: MicrosoftYaHei;
    text-align: left;
    white-space: nowrap;
    line-height: 20px;
  }

  .text_41 {
    width: 64px;
    height: 17px;
    overflow-wrap: break-word;
    color: rgba(26, 26, 26, 1);
    font-size: 16px;
    font-family: MicrosoftYaHei;
    text-align: left;
    white-space: nowrap;
    line-height: 16px;
    margin-top: 43px;
  }

  .text-wrapper_17 {
    width: 56px;
    height: 26px;
    overflow-wrap: break-word;
    font-size: 0;
    font-family: MicrosoftYaHei;
    text-align: left;
    white-space: nowrap;
    line-height: 30px;
    margin: 57px 0 0 81px;
  }

  .text_42 {
    width: 56px;
    height: 26px;
    overflow-wrap: break-word;
    color: rgba(92, 149, 246, 1);
    font-size: 30px;
    font-family: MicrosoftYaHei;
    text-align: left;
    white-space: nowrap;
    line-height: 30px;
  }

  .text_43 {
    width: 56px;
    height: 26px;
    overflow-wrap: break-word;
    color: rgba(92, 149, 246, 1);
    font-size: 18px;
    font-family: MicrosoftYaHei;
    text-align: left;
    white-space: nowrap;
    line-height: 18px;
  }

  .section_13 {
    width: 219px;
    height: 26px;
    margin: 19px 0 0 155px;
  }

  .text_44 {
    width: 64px;
    height: 17px;
    overflow-wrap: break-word;
    color: rgba(26, 26, 26, 1);
    font-size: 16px;
    font-family: MicrosoftYaHei;
    text-align: left;
    white-space: nowrap;
    line-height: 16px;
    margin-top: 6px;
  }

  .text-wrapper_18 {
    width: 55px;
    height: 26px;
    overflow-wrap: break-word;
    font-size: 0;
    font-family: MicrosoftYaHei;
    text-align: left;
    white-space: nowrap;
    line-height: 30px;
  }

  .text_45 {
    width: 55px;
    height: 26px;
    overflow-wrap: break-word;
    color: rgba(92, 149, 246, 1);
    font-size: 30px;
    font-family: MicrosoftYaHei;
    text-align: left;
    white-space: nowrap;
    line-height: 30px;
  }

  .text_46 {
    width: 55px;
    height: 26px;
    overflow-wrap: break-word;
    color: rgba(92, 149, 246, 1);
    font-size: 18px;
    font-family: MicrosoftYaHei;
    text-align: left;
    white-space: nowrap;
    line-height: 18px;
  }

  .section_14 {
    width: 219px;
    height: 26px;
    margin: 19px 0 39px 155px;
  }

  .text_47 {
    width: 64px;
    height: 17px;
    overflow-wrap: break-word;
    color: rgba(26, 26, 26, 1);
    font-size: 16px;
    font-family: MicrosoftYaHei;
    text-align: left;
    white-space: nowrap;
    line-height: 16px;
    margin-top: 6px;
  }

  .text-wrapper_19 {
    width: 73px;
    height: 26px;
    overflow-wrap: break-word;
    font-size: 0;
    font-family: MicrosoftYaHei;
    text-align: left;
    white-space: nowrap;
    line-height: 30px;
  }

  .text_48 {
    width: 73px;
    height: 26px;
    overflow-wrap: break-word;
    color: rgba(92, 149, 246, 1);
    font-size: 30px;
    font-family: MicrosoftYaHei;
    text-align: left;
    white-space: nowrap;
    line-height: 30px;
  }

  .text_49 {
    width: 73px;
    height: 26px;
    overflow-wrap: break-word;
    color: rgba(92, 149, 246, 1);
    font-size: 18px;
    font-family: MicrosoftYaHei;
    text-align: left;
    white-space: nowrap;
    line-height: 18px;
  }
  .section_6 {
    background-color: rgba(255, 255, 255, 1);
    height: 281px;
    border: 1px solid rgba(236, 240, 248, 1);
    width: 381px;
  }

  .box_5 {
    width: 187px;
    height: 71px;
    margin: 22px 0 0 27px;
  }

  .image_1 {
    width: 79px;
    height: 71px;
  }

  .text_19 {
    width: 77px;
    height: 20px;
    overflow-wrap: break-word;
    color: rgba(26, 26, 26, 1);
    font-size: 20px;
    font-family: MicrosoftYaHei;
    text-align: left;
    white-space: nowrap;
    line-height: 20px;
    margin-top: 26px;
  }

  .box_6 {
    width: 340px;
    height: 131px;
    margin: 41px 0 16px 21px;
  }

  .image-text_6 {
    width: 100px;
    height: 131px;
  }

  .text-wrapper_4 {
    height: 100px;
    width: 100px;
  }

  .text_20 {
    width: 42px;
    height: 20px;
    overflow-wrap: break-word;
    color: rgba(255, 255, 255, 1);
    font-size: 24px;
    font-family: MicrosoftYaHei;
    text-align: left;
    white-space: nowrap;
    line-height: 24px;
    margin: 40px 0 0 29px;
  }

  .text-group_6 {
    width: 49px;
    height: 17px;
    overflow-wrap: break-word;
    color: rgba(26, 26, 26, 1);
    font-size: 16px;
    font-family: MicrosoftYaHei;
    text-align: left;
    white-space: nowrap;
    line-height: 16px;
    margin: 14px 0 0 26px;
  }

  .image-text_7 {
    width: 100px;
    height: 131px;
    margin-left: 20px;
  }

  .text-wrapper_5 {
    height: 100px;
    background: url(https://lanhu.oss-cn-beijing.aliyuncs.com/ps89ajl4ezrm9vjipo5ya84u38rtiha2s8f022b254-8aa6-4cec-81f4-f7360f1d02c7) -9px -7px
    no-repeat;
    background-size: 119px 119px;
    width: 100px;
  }

  .text_21 {
    width: 57px;
    height: 20px;
    overflow-wrap: break-word;
    color: rgba(255, 255, 255, 1);
    font-size: 24px;
    font-family: MicrosoftYaHei;
    text-align: left;
    white-space: nowrap;
    line-height: 24px;
    margin: 40px 0 0 21px;
  }

  .text-group_7 {
    width: 49px;
    height: 17px;
    overflow-wrap: break-word;
    color: rgba(26, 26, 26, 1);
    font-size: 16px;
    font-family: MicrosoftYaHei;
    text-align: left;
    white-space: nowrap;
    line-height: 16px;
    margin: 14px 0 0 26px;
  }

  .image-text_8 {
    width: 100px;
    height: 131px;
    margin-left: 20px;
  }

  .box_7 {
    height: 100px;
    background: url(https://lanhu.oss-cn-beijing.aliyuncs.com/psqwsfeyzzbpjg6lk0rjh8nioyvz88jbxh1e179aca-25bb-46b3-9deb-355d1ab527c3) -9px -7px
    no-repeat;
    background-size: 119px 119px;
    width: 100px;
  }

  .text-wrapper_6 {
    width: 81px;
    height: 22px;
    overflow-wrap: break-word;
    font-size: 0;
    font-family: MicrosoftYaHei;
    text-align: left;
    white-space: nowrap;
    line-height: 24px;
    margin: 40px 0 0 11px;
  }

  .text_22 {
    width: 81px;
    height: 22px;
    overflow-wrap: break-word;
    color: rgba(255, 255, 255, 1);
    font-size: 24px;
    font-family: MicrosoftYaHei;
    text-align: left;
    white-space: nowrap;
    line-height: 24px;
  }

  .text_23 {
    width: 81px;
    height: 22px;
    overflow-wrap: break-word;
    color: rgba(255, 255, 255, 1);
    font-size: 16px;
    font-family: MicrosoftYaHei;
    text-align: left;
    white-space: nowrap;
    line-height: 16px;
  }

  .text-group_8 {
    width: 48px;
    height: 17px;
    overflow-wrap: break-word;
    color: rgba(26, 26, 26, 1);
    font-size: 16px;
    font-family: MicrosoftYaHei;
    text-align: left;
    white-space: nowrap;
    line-height: 16px;
    margin: 14px 0 0 26px;
  }
}
</style>
